package jp.co.jalinfotec.sxt.service;

import java.util.Date;
import java.util.List;

import jp.co.jalinfotec.sxt.dto.OrderDto;

/**
 * Interface of order process
 */
public interface OrderService {
	
	/**
	 * Store order info.<br />
	 * When order exists, order info will be updated.
	 * @param bean Order info.
	 * @return on success, return true
	 */
	boolean store(OrderDto bean);
	
	/**
	 * Delete order info.
	 * @param bean Order info.
	 * @return on success, return true.
	 */
	boolean delete(OrderDto bean);
	
	/**
	 * Get order info.
	 * @param id Order ID
	 * @param date Target Date
	 * @return Order info.
	 */
	OrderDto get(String userId, Date date);
	
	/**
	 * Get list of orders.
	 * @param date of ordering
	 * @return list of users.
	 */
	List<OrderDto> getAll(Date date);
	
	/**
	 * Check if the specified order exists.
	 * @param userId UserID
	 * @param date of ordering
	 * @return when exists, return true.
	 */
	boolean exist(String userId, Date date);
}
